// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from "axios"
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 引入vuex-store
import store from './store/index'
// 懒加载
import VueLazyload from 'vue-lazyload'

Vue.config.productionTip = false

// or with options
Vue.use(VueLazyload, {
  preLoad: 1.3,
  loading: '../static/loading.gif',
  attempt: 1
})

Vue.use(ElementUI)

Vue.prototype.$axios = axios;
// base
axios.defaults.baseURL = "https://netease-cloud-music-api-sand-psi.vercel.app"

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {
    App
  },
  beforeCreate() {
    // 安装全局事件总线
    Vue.prototype.$bus = this;
  },
  template: '<App/>'
})
